/**
 * User domain class.
 */
class Person {
    static mapping = {
      table 'yuying_person'
    }
	static transients = ['pass']
	static hasMany = [authorities: Authority]
	static belongsTo = Authority

	/** Username */
	String username
	/** User Real Name*/
	String userRealName
	/** MD5 Password */
	String passwd
	/** enabled */
	boolean enabled
    Integer stage
    String countryCode
    String areaCode
    String longitude
    String latitude 

	String email
	boolean emailShow

	/** description */
	String description = ''

	/** plain password to create a MD5 password */
	String pass = '[secret]'

	static constraints = {
		username(blank: false, unique: true)
		userRealName(blank: false)
		passwd(blank: false)
		enabled()
        stage(nullable:true)
        countryCode(nullable:true)
        areaCode(nullable:true)
        longitude(nullable:true)
        latitude(nullable:true)
        description(nullable:true)
	}
}
